import { createApp } from 'vue'
// import './style.css'
import App from './App.vue'

// 导入 Element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// Element-plus 国际化配置
import zhCn from 'element-plus/es/locale/lang/zh-cn'
// 导入svg图标
// @ts-ignore
import 'virtual:svg-icons-register'
// 使用安装插件的方式注册全局组件
import globalComponents from '@/components/index.ts'
// 导入样式
import '@/styles/index.scss'
// 导入路由
import router from '@/routers/index.ts'
// 引入pinia
import pinia from '@/store/index.ts'

const app = createApp(App)

app.use(pinia)
app.use(router)
// 引入路由鉴权文件
import './premission.ts'
app.use(globalComponents)
app.use(ElementPlus, {
    locale: zhCn,
  })
app.mount('#app')
